<?php
namespace app\index\validate;

use think\Validate;

class Reg extends Validate
{
    protected $rule = [
        'name'  =>  'require',
        'tell'  =>  'require|length:11|unique:user,tell',
        'pwd'   =>  'require|min:6|confirm:repwd',  
    ];

    protected $message  =   [
        'name.require' => '用户昵称不能为空！',
        'tell.require' => '手机号码不能为空！',
        'tell.length'  => '手机号码长度只能11位！',  
        'tell.unique'  => '手机号码已注册！',  
        'pwd.require'  => '密码不能为空！',
        'pwd.min'      => '密码长度最少6位！', 
        'pwd.confirm'  => '两次密码不一致！',  
    ];
}